<form action="" method="post" class="">{% csrf_token %}
    {{ form.next_url.as_hidden }}
    <div class="non-field-errors">{{ form.non_field_errors }}</div>
    <div class="oneliner">
	<h3>Summary of the one-liner<span class="required">*</span></h3>
	<div class="help-block">In one sentence, what does it do?</div>
	<div class="input">
	    <div class="error">{{ form.summary.errors }}</div>
	    <div class="summary">{{ form.summary }}</div>
	</div>
	
	<h3>The one-liner<span class="required">*</span></h3>
	<div class="help-block">Use a space around "|", single space after ";", UPPERCASE variable names, $() style subshells instead of ``</div>
	<div class="input input-prepend">
	    <div class="error">{{ form.line.errors }}</div>
	    <div class="summary input-prepend">
		<span class="add-on">bash$</span>
		{{ form.line }}</div>
	</div>
	
	<h3>Explanation<span class="required">*</span></h3>
	<div class="help-block">This is the most important field. Explain how the one-liner works as if you're teaching it to a good friend. No need to dissect word by word.
	    <br/>Note: any html will be escaped, and the text will be formatted with <a class="help help-markdown" href="{% url oneliners.views.help_markdown %}">markdown</a>.
	</div>
	<div class="input">
	    <div class="error">{{ form.explanation.errors }}</div>
	    <div class="explanation">{{ form.explanation }}</div>
	    <p><a href="{% url oneliners.ajax.markdown %}" class="btn btn-info preview-markdown" data-source="id_explanation">Preview</a></p>
	    <div id="id_explanation-preview"></div>
	</div>
	
	<h3>Limitations (optional)</h3>
	<div class="help-block">For example, if the one-liner might not work in some flavors of UNIX, etc.
	    <br/>Note: any html will be escaped, and the text will be formatted with <a class="help help-markdown" href="{% url oneliners.views.help_markdown %}">markdown</a>.
	<div class="input">
	    <div class="error">{{ form.limitations.errors }}</div>
	    <div class="limitations">{{ form.limitations }}</div>
	    <p><a href="{% url oneliners.ajax.markdown %}" class="btn btn-info preview-markdown" data-source="id_limitations">Preview</a></p>
	    <div id="id_limitations-preview"></div>
	</div>

	<h3>Published</h3>
	<div class="help-block">If checked, the one-liner will be visible in public listings, and will be tweeted on Twitter with <a href="https://twitter.com/#!/bashoneliners">@bashoneliners</a></div>
	<div class="input">
	    <div class="error">{{ form.is_published.errors }}</div>
	    <div class="is_published"><label class="checkbox">{{ form.is_published }} <span>Published</span></label></div>
	</div>

	<div class="form-actions">
	    {% include 'main/elements/please_login.html' %}
	    {% for action in form.actions %}<button class="btn {{ action.cssclass }}" type="submit" name="action" value="{{ action.name }}">{{ action.name }}</button>{% endfor %}
	    <button class="btn"><a href="{{ next_url }}">Cancel</a></button>
	</div>
    </div>
</form>
